package org.zls.client;

import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.VerticalPanel;

public class SearchTab extends Tab {

	private CourseTable table;
	private VerticalPanel panel;
	
	public static TabInfo init() {
		return new TabInfo(
				"Search",
				"<h2> Search Page! </h2>") {

			public Tab createInstance() {
				return new SearchTab();
			}

			public void setTitle() {

				Window.setTitle("HSpot - Search");
			}
		};
	}

	public SearchTab() {
	
		table = new CourseTable();
		panel = new VerticalPanel();
		
		panel.add(table);
		initWidget(panel);
	}
	
	public void update(String query) {
		table.update(query);
	}
	
	public void onShow() {
		table.onShow();
	}
}
